qui(function(require, exports, module) {
	NewsStatistic.Util = $.extend(true, {}, Ancestor.Util, {
			formatter: {
			    status: function (cellvalue, options, rowObject) {
                    return NewsStatistic.Config.NEWS_STATUS_NAME[cellvalue];
                },

                percent: function(v,r) {
                    return v + "%";
                },

                percentWord:function(v,r) {
                    if (r.errorWordNum == null || r.correctWordNum == null) {
                        return "";
                    }
                    if (r.errorWordNum == 0 && r.correctWordNum == 0) {
                        return "0%";
                    }
                    var percentWord = ((r.correctWordNum / (r.errorWordNum + r.correctWordNum)) * 100) + "%";
                    return percentWord;
                },
                percentStartNum:function(v,r) {
                    if (r.correctStartNum == null || r.totalStartNum == null) {
                        return "";
                    }
                    if (r.correctStartNum == 0 && r.totalStartNum == 0) {
                        return "0%";
                    }
                    var percentStartNum = ((r.correctStartNum / r.totalStartNum) * 100) + "%";
                    return percentStartNum;
                },
                percentEndNum:function(v,r) {
                    if (r.correctEndNum == null || r.totalEndNum == null) {
                        return "";
                    }
                    if (r.correctEndNum == 0 && r.totalEndNum == 0) {
                        return "0%";
                    }
                    var percentEndNum = ((r.correctEndNum / r.totalEndNum) * 100) + "%";
                    return percentEndNum;
                },
                percentNews:function(v,r) {
                    if (r.correctNewsNum == null || r.totalNewsNum == null) {
                        return "";
                    }
                    if (r.correctNewsNum == 0 && r.totalNewsNum == 0) {
                        return "0%";
                    }
                    var percentNews = ((r.correctNewsNum / r.totalNewsNum) * 100) + "%";
                    return percentNews;
                }
			}


		});
});